/**
 * DynamicReports - Free Java reporting library for creating reports dynamically
 *
 * Copyright (C) 2010 - 2012 Ricardo Mariaca
 * http://dynamicreports.sourceforge.net
 *
 * This file is part of DynamicReports.
 *
 * DynamicReports is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * DynamicReports is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with DynamicReports. If not, see <http://www.gnu.org/licenses/>.
 */

package yunquan.wang.modules.base.entity;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import yunquan.wang.base.domain.IdEntity;

import com.google.common.collect.Lists;

/**
 * @author Ricardo Mariaca (dynamicreports@gmail.com)
 */
@Entity
@Table(name = "BASE_DYNAMIC_REPORT")
public class DynamicReport extends IdEntity {
	/**
	 * 
	 */
	private static final long serialVersionUID = 9053362939361457961L;
	private String title;//标题
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "dynamicReport")
	private List<DynamicColumn> columns=Lists.newArrayList();//列
	private String groups;//分组
	private String subtotals;//总和
	private boolean showPageNumber;
	private String sqlString;//查询用的SQL
	private String sqlType;//sql type,JPA,SQL
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public List<DynamicColumn> getColumns() {
		return columns;
	}
	public void setColumns(List<DynamicColumn> columns) {
		this.columns = columns;
	}
	public String getGroups() {
		return groups;
	}
	public void setGroups(String groups) {
		this.groups = groups;
	}
	public String getSubtotals() {
		return subtotals;
	}
	public void setSubtotals(String subtotals) {
		this.subtotals = subtotals;
	}
	public boolean isShowPageNumber() {
		return showPageNumber;
	}
	public void setShowPageNumber(boolean showPageNumber) {
		this.showPageNumber = showPageNumber;
	}
 
	public String getSqlString() {
		return sqlString;
	}
	public void setSqlString(String sqlString) {
		this.sqlString = sqlString;
	}
	public String getSqlType() {
		return sqlType;
	}
	public void setSqlType(String sqlType) {
		this.sqlType = sqlType;
	}

}
